home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / snk68.c < prev    next >
C/C++ Source or Header  |  2000-04-11  |  47KB  |  1,270 lines

  1. /***************************************************************************
  2.  
  3.     POW - Prisoners Of War (US)            A7008    SNK 1988
  4.     POW - Prisoners Of War (Japan)        A7008    SNK 1988
  5.     SAR - Search And Rescue    (World)        A8007    SNK 1989
  6.     SAR - Search And Rescue    (US)        A8007    SNK 1989
  7.     Street Smart (US version 1)            A8007    SNK 1989
  8.     Street Smart (US version 2)            A7008    SNK 1989
  9.     Street Smart (Japan version 1)        A8007    SNK 1989
  10.     Ikari III - The Rescue (US)            A7007    SNK 1989
  11.  
  12.     For some strange reason version 2 of Street Smart runs on Pow hardware!
  13.  
  14.     Emulation by Bryan McPhail, mish@tendril.co.uk
  15.  
  16. ***************************************************************************/
  17.  
  18. #include "driver.h"
  19. #include "vidhrdw/generic.h"
  20. #include "cpu/z80/z80.h"
  21.  
  22. int  pow_vh_start(void);
  23. int  searchar_vh_start(void);
  24. int  ikari3_vh_start(void);
  25. void pow_vh_screenrefresh(struct osd_bitmap *bitmap, int full_refresh);
  26. void searchar_vh_screenrefresh(struct osd_bitmap *bitmap, int full_refresh);
  27. WRITE_HANDLER( pow_paletteram_w );
  28. WRITE_HANDLER( pow_flipscreen_w );
  29. WRITE_HANDLER( pow_video_w );
  30.  
  31. static int invert_controls;
  32.  
  33. /******************************************************************************/
  34.  
  35. static READ_HANDLER( sound_cpu_r )
  36. {
  37.     return 0x0100;
  38. }
  39.  
  40. static READ_HANDLER( pow_video_r )
  41. {
  42.     return READ_WORD(&videoram[offset]);
  43. }
  44.  
  45. static WRITE_HANDLER( pow_spriteram_w )
  46. {
  47.     /* DWORD aligned bytes should be $ff */
  48.     if (offset & 0x02)
  49.         WRITE_WORD(&spriteram[offset], data);
  50.     else
  51.         WRITE_WORD(&spriteram[offset], data | 0xff00);
  52. }
  53.  
  54. static READ_HANDLER( pow_spriteram_r )
  55. {
  56.     return READ_WORD(&spriteram[offset]);
  57. }
  58.  
  59. static READ_HANDLER( control_1_r )
  60. {
  61.     return (readinputport(0) + (readinputport(1) << 8));
  62. }
  63.  
  64. static READ_HANDLER( control_2_r )
  65. {
  66.     return readinputport(2);
  67. }
  68.  
  69. static READ_HANDLER( dip_1_r )
  70. {
  71.     return (readinputport(3) << 8);
  72. }
  73.  
  74. static READ_HANDLER( dip_2_r )
  75. {
  76.     return (readinputport(4) << 8);
  77. }
  78.  
  79. static READ_HANDLER( rotary_1_r )
  80. {
  81.     return (( ~(1 << (readinputport(5) * 12 / 256)) )<<8)&0xff00;
  82. }
  83.  
  84. static READ_HANDLER( rotary_2_r )
  85. {
  86.     return (( ~(1 << (readinputport(6) * 12 / 256)) )<<8)&0xff00;
  87. }
  88.  
  89. static READ_HANDLER( rotary_lsb_r )
  90. {
  91.     return ((( ~(1 << (readinputport(6) * 12 / 256))  ) <<4)&0xf000)
  92.          + ((( ~(1 << (readinputport(5) * 12 / 256))  )    )&0x0f00);
  93. }
  94.  
  95. static READ_HANDLER( protcontrols_r )
  96. {
  97.     return readinputport(offset / 2) ^ invert_controls;
  98. }
  99.  
  100. static WRITE_HANDLER( protection_w )
  101. {
  102.     /* top byte is used, meaning unknown */
  103.     /* bottom byte is protection in ikari 3 and streetsm */
  104.     if ((data & 0x00ff0000) == 0)
  105.         invert_controls = ((data & 0xff) == 0x07) ? 0xff : 0x00;
  106. }
  107.  
  108. static WRITE_HANDLER( sound_w )
  109. {
  110.     soundlatch_w(0,(data>>8)&0xff);
  111.     cpu_cause_interrupt(1,Z80_NMI_INT);
  112. }
  113.  
  114. /*******************************************************************************/
  115.  
  116. static struct MemoryReadAddress pow_readmem[] =
  117. {
  118.     { 0x000000, 0x03ffff, MRA_ROM },
  119.     { 0x040000, 0x043fff, MRA_BANK1 },
  120.     { 0x080000, 0x080001, control_1_r },
  121.     { 0x0c0000, 0x0c0001, control_2_r },
  122.     { 0x0e0000, 0x0e0001, MRA_NOP }, /* Watchdog or IRQ ack */
  123.     { 0x0e8000, 0x0e8001, MRA_NOP }, /* Watchdog or IRQ ack */
  124.     { 0x0f0000, 0x0f0001, dip_1_r },
  125.     { 0x0f0008, 0x0f0009, dip_2_r },
  126.     { 0x100000, 0x100fff, pow_video_r },
  127.     { 0x200000, 0x207fff, pow_spriteram_r },
  128.     { 0x400000, 0x400fff, paletteram_word_r },
  129.     { -1 }  /* end of table */
  130. };
  131.  
  132. static struct MemoryWriteAddress pow_writemem[] =
  133. {
  134.     { 0x000000, 0x03ffff, MWA_ROM },
  135.     { 0x040000, 0x043fff, MWA_BANK1 },
  136.     { 0x080000, 0x080001, sound_w },
  137.     { 0x0c0000, 0x0c0001, pow_flipscreen_w },
  138.     { 0x0f0008, 0x0f0009, MWA_NOP },
  139.     { 0x100000, 0x100fff, pow_video_w, &videoram },
  140.     { 0x200000, 0x207fff, pow_spriteram_w, &spriteram },
  141.     { 0x400000, 0x400fff, pow_paletteram_w, &paletteram },
  142.     { -1 }  /* end of table */
  143. };
  144.  
  145. static struct MemoryReadAddress searchar_readmem[] =
  146. {
  147.     { 0x000000, 0x03ffff, MRA_ROM },
  148.     { 0x040000, 0x043fff, MRA_BANK1 },
  149.     { 0x080000, 0x080005, protcontrols_r }, /* Player 1 & 2 */
  150.     { 0x0c0000, 0x0c0001, rotary_1_r }, /* Player 1 rotary */
  151.     { 0x0c8000, 0x0c8001, rotary_2_r }, /* Player 2 rotary */
  152.     { 0x0d0000, 0x0d0001, rotary_lsb_r }, /* Extra rotary bits */
  153.     { 0x0e0000, 0x0e0001, MRA_NOP },  /* Watchdog or IRQ ack */
  154.     { 0x0e8000, 0x0e8001, MRA_NOP },  /* Watchdog or IRQ ack */
  155.     { 0x0f0000, 0x0f0001, dip_1_r },
  156.     { 0x0f0008, 0x0f0009, dip_2_r },
  157.     { 0x0f8000, 0x0f8001, sound_cpu_r },
  158.     { 0x100000, 0x107fff, pow_spriteram_r },
  159.     { 0x200000, 0x200fff, pow_video_r },
  160.     { 0x300000, 0x33ffff, MRA_BANK8 }, /* Extra code bank */
  161.     { 0x400000, 0x400fff, paletteram_word_r },
  162.     { -1 }  /* end of table */
  163. };
  164.  
  165. static struct MemoryWriteAddress searchar_writemem[] =
  166. {
  167.     { 0x000000, 0x03ffff, MWA_ROM },
  168.     { 0x040000, 0x043fff, MWA_BANK1 },
  169.     { 0x080000, 0x080001, sound_w },
  170.     { 0x080006, 0x080007, protection_w }, /* top byte unknown, bottom is protection in ikari3 and streetsm */
  171.     { 0x0c0000, 0x0c0001, pow_flipscreen_w },
  172.     { 0x0f0000, 0x0f0001, MWA_NOP },
  173.     { 0x100000, 0x107fff, pow_spriteram_w, &spriteram },
  174.     { 0x200000, 0x200fff, pow_video_w, &videoram },
  175.     { 0x201000, 0x201fff, pow_video_w }, /* Mirror used by Ikari 3 */
  176.     { 0x400000, 0x400fff, pow_paletteram_w, &paletteram },
  177.     { -1 }  /* end of table */
  178. };
  179.  
  180. /******************************************************************************/
  181.  
  182. static struct MemoryReadAddress sound_readmem[] =
  183. {
  184.     { 0x0000, 0xefff, MRA_ROM },
  185.     { 0xf000, 0xf7ff, MRA_RAM },
  186.     { 0xf800, 0xf800, soundlatch_r },
  187.     { -1 }    /* end of table */
  188. };
  189.  
  190. static struct MemoryWriteAddress sound_writemem[] =
  191. {
  192.     { 0x0000, 0xefff, MWA_ROM },
  193.     { 0xf000, 0xf7ff, MWA_RAM },
  194.     { -1 }    /* end of table */
  195. };
  196.  
  197. static WRITE_HANDLER( D7759_write_port_0_w )
  198. {
  199.     UPD7759_reset_w (0,0);
  200.     UPD7759_message_w(offset,data);
  201.     UPD7759_start_w (0,0);
  202. }
  203.  
  204. static struct IOReadPort sound_readport[] =
  205. {
  206.     { 0x00, 0x00, YM3812_status_port_0_r },
  207.     { -1 }
  208. };
  209.  
  210. static struct IOWritePort sound_writeport[] =
  211. {
  212.     { 0x00, 0x00, YM3812_control_port_0_w },
  213.     { 0x20, 0x20, YM3812_write_port_0_w },
  214.     { 0x40, 0x40, D7759_write_port_0_w },
  215.     { 0x80, 0x80, MWA_NOP }, /* IRQ ack? */
  216.     { -1 }
  217. };
  218.  
  219. /******************************************************************************/
  220.  
  221.  
  222. INPUT_PORTS_START( pow )
  223.     PORT_START    /* Player 1 controls */
  224.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
  225.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  226.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  227.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  228.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  229.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
  230.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
  231.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
  232.  
  233.     PORT_START    /* Player 2 controls */
  234.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
  235.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
  236.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
  237.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  238.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  239.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  240.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
  241.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2  )
  242.  
  243.     PORT_START
  244.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 )
  245.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE )    /* same as the service mode dsw */
  246.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
  247.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  248.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
  249.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
  250.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  251.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  252.  
  253.     PORT_START    /* Dip switch bank 1, all active high */
  254.     PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coin_B ) )
  255.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  256.     PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
  257.     PORT_DIPSETTING(    0x01, DEF_STR( 1C_3C ) )
  258.     PORT_DIPSETTING(    0x03, DEF_STR( 1C_4C ) )
  259.     PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coin_A ) )
  260.     PORT_DIPSETTING(    0x0c, DEF_STR( 4C_1C ) )
  261.     PORT_DIPSETTING(    0x04, DEF_STR( 3C_1C ) )
  262.     PORT_DIPSETTING(    0x08, DEF_STR( 2C_1C ) )
  263.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  264.     PORT_DIPNAME( 0x10, 0x10, DEF_STR( Lives ) )
  265.     PORT_DIPSETTING(    0x00, "2" )
  266.     PORT_DIPSETTING(    0x10, "3" )
  267.     PORT_DIPNAME( 0x20, 0x00, "Bonus Occurence" )
  268.     PORT_DIPSETTING(    0x00, "1st & 2nd only" )
  269.     PORT_DIPSETTING(    0x20, "1st & every 2nd" )
  270.     PORT_DIPNAME( 0x40, 0x00, "Language" )
  271.     PORT_DIPSETTING(    0x00, "English" )
  272.     PORT_DIPSETTING(    0x40, "Japanese" )
  273.     PORT_DIPNAME( 0x80, 0x00, DEF_STR( Flip_Screen ) )
  274.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  275.     PORT_DIPSETTING(    0x80, DEF_STR( On ) )
  276.  
  277.     PORT_START    /* Dip switch bank 2, all active high */
  278.     PORT_SERVICE( 0x01, IP_ACTIVE_HIGH )
  279.     PORT_DIPNAME( 0x02, 0x00, "Allow Continue" )
  280.     PORT_DIPSETTING(    0x02, DEF_STR( No ) )
  281.     PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
  282.     PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )
  283.     PORT_DIPSETTING(    0x00, "20k 50k" )
  284.     PORT_DIPSETTING(    0x08, "40k 100k" )
  285.     PORT_DIPSETTING(    0x04, "60k 150k" )
  286.     PORT_DIPSETTING(    0x0c, "None" )
  287.     PORT_DIPNAME( 0x30, 0x00, "Game Mode" )
  288.     PORT_DIPSETTING(    0x00, "Demo Sounds On" )
  289.     PORT_DIPSETTING(    0x20, "Demo Sounds Off" )
  290.     PORT_DIPSETTING(    0x30, "Freeze" )
  291.     PORT_BITX( 0,       0x10, IPT_DIPSWITCH_SETTING | IPF_CHEAT, "Infinite Lives", IP_KEY_NONE, IP_JOY_NONE )
  292.     PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Difficulty ) )
  293.     PORT_DIPSETTING(    0x80, "Easy" )
  294.     PORT_DIPSETTING(    0x00, "Normal" )
  295.     PORT_DIPSETTING(    0x40, "Hard" )
  296.     PORT_DIPSETTING(    0xc0, "Hardest" )
  297. INPUT_PORTS_END
  298.  
  299.  
  300. /* Identical to pow, but the Language dip switch has no effect */
  301. INPUT_PORTS_START( powj )
  302.     PORT_START    /* Player 1 controls */
  303.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
  304.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  305.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  306.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  307.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  308.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
  309.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
  310.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
  311.  
  312.     PORT_START    /* Player 2 controls */
  313.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
  314.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
  315.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
  316.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  317.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  318.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  319.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
  320.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2  )
  321.  
  322.     PORT_START
  323.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 )
  324.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE )    /* same as the service mode dsw */
  325.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
  326.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  327.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
  328.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
  329.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  330.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  331.  
  332.     PORT_START    /* Dip switch bank 1, all active high */
  333.     PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coin_B ) )
  334.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  335.     PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
  336.     PORT_DIPSETTING(    0x01, DEF_STR( 1C_3C ) )
  337.     PORT_DIPSETTING(    0x03, DEF_STR( 1C_4C ) )
  338.     PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coin_A ) )
  339.     PORT_DIPSETTING(    0x0c, DEF_STR( 4C_1C ) )
  340.     PORT_DIPSETTING(    0x04, DEF_STR( 3C_1C ) )
  341.     PORT_DIPSETTING(    0x08, DEF_STR( 2C_1C ) )
  342.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  343.     PORT_DIPNAME( 0x10, 0x10, DEF_STR( Lives ) )
  344.     PORT_DIPSETTING(    0x00, "2" )
  345.     PORT_DIPSETTING(    0x10, "3" )
  346.     PORT_DIPNAME( 0x20, 0x00, "Bonus Occurence" )
  347.     PORT_DIPSETTING(    0x00, "1st & 2nd only" )
  348.     PORT_DIPSETTING(    0x20, "1st & every 2nd" )
  349.     PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
  350.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  351.     PORT_DIPSETTING(    0x40, DEF_STR( On ) )
  352.     PORT_DIPNAME( 0x80, 0x00, DEF_STR( Flip_Screen ) )
  353.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  354.     PORT_DIPSETTING(    0x80, DEF_STR( On ) )
  355.  
  356.     PORT_START    /* Dip switch bank 2, all active high */
  357.     PORT_SERVICE( 0x01, IP_ACTIVE_HIGH )
  358.     PORT_DIPNAME( 0x02, 0x00, "Allow Continue" )
  359.     PORT_DIPSETTING(    0x02, DEF_STR( No ) )
  360.     PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
  361.     PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )
  362.     PORT_DIPSETTING(    0x00, "20k 50k" )
  363.     PORT_DIPSETTING(    0x08, "40k 100k" )
  364.     PORT_DIPSETTING(    0x04, "60k 150k" )
  365.     PORT_DIPSETTING(    0x0c, "None" )
  366.     PORT_DIPNAME( 0x30, 0x00, "Game Mode" )
  367.     PORT_DIPSETTING(    0x00, "Demo Sounds On" )
  368.     PORT_DIPSETTING(    0x20, "Demo Sounds Off" )
  369.     PORT_DIPSETTING(    0x30, "Freeze" )
  370.     PORT_BITX( 0,       0x10, IPT_DIPSWITCH_SETTING | IPF_CHEAT, "Infinite Lives", IP_KEY_NONE, IP_JOY_NONE )
  371.     PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Difficulty ) )
  372.     PORT_DIPSETTING(    0x80, "Easy" )
  373.     PORT_DIPSETTING(    0x00, "Normal" )
  374.     PORT_DIPSETTING(    0x40, "Hard" )
  375.     PORT_DIPSETTING(    0xc0, "Hardest" )
  376. INPUT_PORTS_END
  377.  
  378.  
  379. INPUT_PORTS_START( searchar )
  380.     PORT_START    /* Player 1 controls */
  381.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
  382.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  383.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  384.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  385.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  386.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
  387.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
  388.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
  389.  
  390.     PORT_START    /* Player 2 controls */
  391.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
  392.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
  393.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
  394.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  395.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  396.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  397.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
  398.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2  )
  399.  
  400.     PORT_START    /* coin */
  401.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 )
  402.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE )    /* same as the service mode dsw */
  403.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
  404.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  405.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
  406.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
  407.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  408.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  409.  
  410.     PORT_START    /* Dip switches (Active high) */
  411.     PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
  412.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  413.     PORT_DIPSETTING(    0x01, DEF_STR( On ) )
  414.     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
  415.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  416.     PORT_DIPSETTING(    0x02, DEF_STR( On ) )
  417.     PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Lives ) )
  418.     PORT_DIPSETTING(    0x08, "2" )
  419.     PORT_DIPSETTING(    0x00, "3" )
  420.     PORT_DIPSETTING(    0x04, "4" )
  421.     PORT_DIPSETTING(    0x0c, "5" )
  422.     PORT_DIPNAME( 0x30, 0x00, "Coin A & B" )
  423.     PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
  424.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  425.     PORT_DIPSETTING(    0x10, DEF_STR( 1C_2C ) )
  426.     PORT_DIPSETTING(    0x30, DEF_STR( Free_Play ) )
  427.     PORT_DIPNAME( 0x40, 0x00, "Bonus Occurrence" )
  428.     PORT_DIPSETTING(    0x00, "1st & 2nd only" )
  429.     PORT_DIPSETTING(    0x40, "1st & every 2nd" )
  430.     PORT_DIPNAME( 0x80, 0x00, DEF_STR( Flip_Screen ) )
  431.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  432.     PORT_DIPSETTING(    0x80, DEF_STR( On ) )
  433.  
  434.     PORT_START /* Dip switches (Active high) */
  435.     PORT_SERVICE( 0x01, IP_ACTIVE_HIGH )
  436.     PORT_DIPNAME( 0x02, 0x00, "Allow Continue" )
  437.     PORT_DIPSETTING(    0x02, DEF_STR( No ) )
  438.     PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
  439.     PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )
  440.     PORT_DIPSETTING(    0x00, "50k 200k" )
  441.     PORT_DIPSETTING(    0x08, "70k 270k" )
  442.     PORT_DIPSETTING(    0x04, "90k 350k" )
  443.     PORT_DIPSETTING(    0x0c, "None" )
  444.     PORT_DIPNAME( 0x30, 0x00, "Game Mode" )
  445.     PORT_DIPSETTING(    0x20, "Demo Sounds Off" )
  446.     PORT_DIPSETTING(    0x00, "Demo Sounds On" )
  447.     PORT_DIPSETTING(    0x30, "Freeze" )
  448.     PORT_BITX( 0,       0x10, IPT_DIPSWITCH_SETTING | IPF_CHEAT, "Infinite Lives", IP_KEY_NONE, IP_JOY_NONE )
  449.     PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Difficulty ) )
  450.     PORT_DIPSETTING(    0x80, "Easy" )
  451.     PORT_DIPSETTING(    0x00, "Normal" )
  452.     PORT_DIPSETTING(    0x40, "Hard" )
  453.     PORT_DIPSETTING(    0xc0, "Hardest" )
  454.  
  455.     PORT_START    /* player 1 12-way rotary control - converted in controls_r() */
  456.     PORT_ANALOGX( 0xff, 0x00, IPT_DIAL | IPF_REVERSE, 25, 10, 0, 0, KEYCODE_Z, KEYCODE_X, 0, 0 )
  457.  
  458.     PORT_START    /* player 2 12-way rotary control - converted in controls_r() */
  459.     PORT_ANALOGX( 0xff, 0x00, IPT_DIAL | IPF_REVERSE | IPF_PLAYER2, 25, 10, 0, 0, KEYCODE_N, KEYCODE_M, 0, 0 )
  460. INPUT_PORTS_END
  461.  
  462.  
  463. INPUT_PORTS_START( streetsm )
  464.     PORT_START    /* Player 1 controls */
  465.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
  466.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  467.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  468.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  469.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  470.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 )
  471.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 )
  472.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
  473.  
  474.     PORT_START    /* Player 2 controls */
  475.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
  476.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
  477.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
  478.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  479.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  480.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
  481.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  482.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2  )
  483.  
  484.     PORT_START    /* coin */
  485.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 )
  486.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE )    /* same as the service mode dsw */
  487.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
  488.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  489.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
  490.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
  491.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  492.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  493.  
  494.     PORT_START    /* Dip switches (Active high) */
  495.     PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
  496.     PORT_DIPSETTING(    0x02, "1" )
  497.     PORT_DIPSETTING(    0x00, "2" )
  498.     PORT_DIPSETTING(    0x01, "3" )
  499.     PORT_DIPSETTING(    0x03, "4" )
  500.     PORT_DIPNAME( 0x0c, 0x00, "Coin A & B" )
  501.     PORT_DIPSETTING(    0x08, DEF_STR( 2C_1C ) )
  502.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  503.     PORT_DIPSETTING(    0x04, DEF_STR( 1C_2C ) )
  504.     PORT_DIPSETTING(    0x0c, DEF_STR( Free_Play ) )
  505.     PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
  506.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  507.     PORT_DIPSETTING(    0x10, DEF_STR( On ) )
  508.     PORT_DIPNAME( 0x20, 0x00, "Bonus Occurrence" )
  509.     PORT_DIPSETTING(    0x00, "1st & 2nd only" )
  510.     PORT_DIPSETTING(    0x20, "1st & every 2nd" )
  511.     PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
  512.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  513.     PORT_DIPSETTING(    0x40, DEF_STR( On ) )
  514.     PORT_DIPNAME( 0x80, 0x00, DEF_STR( Flip_Screen ) )
  515.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  516.     PORT_DIPSETTING(    0x80, DEF_STR( On ) )
  517.  
  518.     PORT_START /* Dip switches (Active high) */
  519.     PORT_SERVICE( 0x01, IP_ACTIVE_HIGH )
  520.     PORT_DIPNAME( 0x02, 0x00, "Allow Continue" )
  521.     PORT_DIPSETTING(    0x02, DEF_STR( No ) )
  522.     PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
  523.     PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )
  524.     PORT_DIPSETTING(    0x00, "200k 400k" )
  525.     PORT_DIPSETTING(    0x08, "400k 600k" )
  526.     PORT_DIPSETTING(    0x04, "600k 800k" )
  527.     PORT_DIPSETTING(    0x0c, "None" )
  528.     PORT_DIPNAME( 0x30, 0x00, "Game Mode" )
  529.     PORT_DIPSETTING(    0x20, "Demo Sounds Off" )
  530.     PORT_DIPSETTING(    0x00, "Demo Sounds On" )
  531.     PORT_DIPSETTING(    0x30, "Freeze" )
  532.     PORT_BITX( 0,       0x10, IPT_DIPSWITCH_SETTING | IPF_CHEAT, "Infinite Lives", IP_KEY_NONE, IP_JOY_NONE )
  533.     PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Difficulty ) )
  534.     PORT_DIPSETTING(    0x80, "Easy" )
  535.     PORT_DIPSETTING(    0x00, "Normal" )
  536.     PORT_DIPSETTING(    0x40, "Hard" )
  537.     PORT_DIPSETTING(    0xc0, "Hardest" )
  538.  
  539.     PORT_START    /* player 1 12-way rotary control - not used in this game */
  540.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  541.  
  542.     PORT_START    /* player 2 12-way rotary control - not used in this game */
  543.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  544. INPUT_PORTS_END
  545.  
  546.  
  547. /* Same as streetsm, but Coinage is different */
  548. INPUT_PORTS_START( streetsj )
  549.     PORT_START    /* Player 1 controls */
  550.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
  551.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  552.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  553.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  554.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  555.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 )
  556.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 )
  557.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
  558.  
  559.     PORT_START    /* Player 2 controls */
  560.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
  561.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
  562.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
  563.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  564.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  565.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
  566.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  567.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2  )
  568.  
  569.     PORT_START    /* coin */
  570.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 )
  571.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE )    /* same as the service mode dsw */
  572.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
  573.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  574.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
  575.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
  576.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  577.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  578.  
  579.     PORT_START    /* Dip switches (Active high) */
  580.     PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
  581.     PORT_DIPSETTING(    0x02, "1" )
  582.     PORT_DIPSETTING(    0x00, "2" )
  583.     PORT_DIPSETTING(    0x01, "3" )
  584.     PORT_DIPSETTING(    0x03, "4" )
  585.     PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coinage ) )
  586.     PORT_DIPSETTING(    0x0c, "A 4/1 B 1/4" )
  587.     PORT_DIPSETTING(    0x04, "A 3/1 B 1/3" )
  588.     PORT_DIPSETTING(    0x08, "A 2/1 B 1/2" )
  589.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  590.     PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
  591.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  592.     PORT_DIPSETTING(    0x10, DEF_STR( On ) )
  593.     PORT_DIPNAME( 0x20, 0x00, "Bonus Occurrence" )
  594.     PORT_DIPSETTING(    0x00, "1st & 2nd only" )
  595.     PORT_DIPSETTING(    0x20, "1st & every 2nd" )
  596.     PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
  597.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  598.     PORT_DIPSETTING(    0x40, DEF_STR( On ) )
  599.     PORT_DIPNAME( 0x80, 0x00, DEF_STR( Flip_Screen ) )
  600.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  601.     PORT_DIPSETTING(    0x80, DEF_STR( On ) )
  602.  
  603.     PORT_START /* Dip switches (Active high) */
  604.     PORT_SERVICE( 0x01, IP_ACTIVE_HIGH )
  605.     PORT_DIPNAME( 0x02, 0x00, "Allow Continue" )
  606.     PORT_DIPSETTING(    0x02, DEF_STR( No ) )
  607.     PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
  608.     PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )
  609.     PORT_DIPSETTING(    0x00, "200k 400k" )
  610.     PORT_DIPSETTING(    0x08, "400k 600k" )
  611.     PORT_DIPSETTING(    0x04, "600k 800k" )
  612.     PORT_DIPSETTING(    0x0c, "None" )
  613.     PORT_DIPNAME( 0x30, 0x00, "Game Mode" )
  614.     PORT_DIPSETTING(    0x20, "Demo Sounds Off" )
  615.     PORT_DIPSETTING(    0x00, "Demo Sounds On" )
  616.     PORT_DIPSETTING(    0x30, "Freeze" )
  617.     PORT_BITX( 0,       0x10, IPT_DIPSWITCH_SETTING | IPF_CHEAT, "Infinite Lives", IP_KEY_NONE, IP_JOY_NONE )
  618.     PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Difficulty ) )
  619.     PORT_DIPSETTING(    0x80, "Easy" )
  620.     PORT_DIPSETTING(    0x00, "Normal" )
  621.     PORT_DIPSETTING(    0x40, "Hard" )
  622.     PORT_DIPSETTING(    0xc0, "Hardest" )
  623.  
  624.     PORT_START    /* player 1 12-way rotary control - not used in this game */
  625.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  626.  
  627.     PORT_START    /* player 2 12-way rotary control - not used in this game */
  628.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
  629. INPUT_PORTS_END
  630.  
  631.  
  632. INPUT_PORTS_START( ikari3 )
  633.     PORT_START    /* Player 1 controls, maybe all are active_high? */
  634.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
  635.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  636.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  637.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  638.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  639.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 )
  640.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 )
  641.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
  642.  
  643.     PORT_START    /* Player 2 controls */
  644.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_PLAYER2 )
  645.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_PLAYER2 )
  646.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_PLAYER2 )
  647.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  648.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  649.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
  650.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  651.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2  )
  652.  
  653.     PORT_START    /* coin */
  654.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 )
  655.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE )    /* same as the service mode dsw */
  656.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
  657.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  658.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
  659.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
  660.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  661.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  662.  
  663.     PORT_START    /* Dip switches (Active high) */
  664.     PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
  665.     PORT_DIPSETTING(    0x02, "2" )
  666.     PORT_DIPSETTING(    0x00, "3" )
  667.     PORT_DIPSETTING(    0x01, "4" )
  668.     PORT_DIPSETTING(    0x03, "5" )
  669.     PORT_DIPNAME( 0x0c, 0x00, "Coin A & B" )
  670.     PORT_DIPSETTING(    0x08, "First 2 Coins/1 Credit then 1/1" )
  671.     PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
  672.     PORT_DIPSETTING(    0x04, "First 1 Coin/2 Credits then 1/1" )
  673.     PORT_DIPSETTING(    0x0c, DEF_STR( Free_Play ) )
  674.     PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
  675.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  676.     PORT_DIPSETTING(    0x10, DEF_STR( On ) )
  677.     PORT_DIPNAME( 0x20, 0x00, "Bonus Occurrence" )
  678.     PORT_DIPSETTING(    0x00, "1st & 2nd only" )
  679.     PORT_DIPSETTING(    0x20, "1st & every 2nd" )
  680.     PORT_DIPNAME( 0x40, 0x00, "Blood" )
  681.     PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  682.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  683.     PORT_DIPNAME( 0x80, 0x00, DEF_STR( Flip_Screen ) )
  684.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  685.     PORT_DIPSETTING(    0x80, DEF_STR( On ) )
  686.  
  687.     PORT_START /* Dip switches (Active high) */
  688.     PORT_SERVICE( 0x01, IP_ACTIVE_HIGH )
  689.     PORT_DIPNAME( 0x02, 0x00, "Allow Continue" )
  690.     PORT_DIPSETTING(    0x02, DEF_STR( No ) )
  691.     PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
  692.     PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )
  693.     PORT_DIPSETTING(    0x00, "20k 50k" )
  694.     PORT_DIPSETTING(    0x08, "40k 100k" )
  695.     PORT_DIPSETTING(    0x04, "60k 150k" )
  696.     PORT_DIPSETTING(    0x0c, "None" )
  697.     PORT_DIPNAME( 0x30, 0x00, "Game Mode" )
  698.     PORT_DIPSETTING(    0x20, "Demo Sounds Off" )
  699.     PORT_DIPSETTING(    0x00, "Demo Sounds On" )
  700.     PORT_DIPSETTING(    0x30, "Freeze" )
  701.     PORT_BITX( 0,       0x10, IPT_DIPSWITCH_SETTING | IPF_CHEAT, "Infinite Lives", IP_KEY_NONE, IP_JOY_NONE )
  702.     PORT_DIPNAME( 0xc0, 0x80, DEF_STR( Difficulty ) )
  703.     PORT_DIPSETTING(    0x00, "Easy" )
  704.     PORT_DIPSETTING(    0x80, "Normal" )
  705.     PORT_DIPSETTING(    0x40, "Hard" )
  706.     PORT_DIPSETTING(    0xc0, "Hardest" )
  707.  
  708.     PORT_START    /* player 1 12-way rotary control - converted in controls_r() */
  709.     PORT_ANALOGX( 0xff, 0x00, IPT_DIAL | IPF_REVERSE, 25, 10, 0, 0, KEYCODE_Z, KEYCODE_X, 0, 0 )
  710.  
  711.     PORT_START    /* player 2 12-way rotary control - converted in controls_r() */
  712.     PORT_ANALOGX( 0xff, 0x00, IPT_DIAL | IPF_REVERSE | IPF_PLAYER2, 25, 10, 0, 0, KEYCODE_N, KEYCODE_M, 0, 0 )
  713. INPUT_PORTS_END
  714.  
  715. /******************************************************************************/
  716.  
  717. static struct GfxLayout charlayout =
  718. {
  719.     8,8,    /* 8*8 chars */
  720.     2048,
  721.     4,        /* 4 bits per pixel  */
  722.     { 0, 4, 0x8000*8, (0x8000*8)+4 },
  723.     { 8*8+3, 8*8+2, 8*8+1, 8*8+0, 3, 2, 1, 0 },
  724.     { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
  725.     16*8    /* every char takes 8 consecutive bytes */
  726. };
  727.  
  728. static struct GfxLayout pow_spritelayout =
  729. {
  730.     16,16,    /* 16*16 sprites */
  731.     4096*4,
  732.     4,        /* 4 bits per pixel */
  733.     { 0, 0x80000*8, 0x100000*8, 0x180000*8 },
  734.     { 16*8+7, 16*8+6, 16*8+5, 16*8+4, 16*8+3, 16*8+2, 16*8+1, 16*8+0,
  735.       7, 6, 5, 4, 3, 2, 1, 0 },
  736.     { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
  737.       8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 },
  738.     8*32    /* every sprite takes 32 consecutive bytes */
  739. };
  740.  
  741. static struct GfxLayout searchar_spritelayout =
  742. {
  743.     16,16,
  744.     0x6000,
  745.     4,
  746.     { 0, 8,0x180000*8, 0x180000*8+8 },
  747.     { 32*8+7, 32*8+6, 32*8+5, 32*8+4, 32*8+3, 32*8+2, 32*8+1, 32*8+0,
  748.         7, 6, 5, 4, 3, 2, 1, 0
  749.     },
  750.     { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16,
  751.         8*16, 9*16, 10*16, 11*16, 12*16, 13*16, 14*16, 15*16
  752.     },
  753.     64*8
  754. };
  755.  
  756. static struct GfxLayout ikari3_spritelayout =
  757. {
  758.     16,16,    /* 16*16 sprites */
  759.     4096*5,
  760.     4,        /* 4 bits per pixel */
  761.     { 0x140000*8, 0, 0xa0000*8, 0x1e0000*8 },
  762.     { 16*8+7, 16*8+6, 16*8+5, 16*8+4, 16*8+3, 16*8+2, 16*8+1, 16*8+0,
  763.       7, 6, 5, 4, 3, 2, 1, 0 },
  764.     { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
  765.       8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 },
  766.     8*32    /* every sprite takes 32 consecutive bytes */
  767. };
  768.  
  769. static struct GfxDecodeInfo pow_gfxdecodeinfo[] =
  770. {
  771.     { REGION_GFX1, 0, &charlayout,       0, 128 },
  772.     { REGION_GFX2, 0, &pow_spritelayout, 0, 128 },
  773.     { -1 } /* end of array */
  774. };
  775.  
  776. static struct GfxDecodeInfo searchar_gfxdecodeinfo[] =
  777. {
  778.     { REGION_GFX1, 0, &charlayout,            0,  16 },
  779.     { REGION_GFX2, 0, &searchar_spritelayout, 0, 128 },
  780.     { -1 } /* end of array */
  781. };
  782.  
  783. static struct GfxDecodeInfo ikari3_gfxdecodeinfo[] =
  784. {
  785.     { REGION_GFX1, 0, &charlayout,          0,  16 },
  786.     { REGION_GFX2, 0, &ikari3_spritelayout, 0, 128 },
  787.     { -1 } /* end of array */
  788. };
  789.  
  790. /******************************************************************************/
  791.  
  792. static void irqhandler(int irq)
  793. {
  794.     cpu_set_irq_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
  795. }
  796.  
  797. static struct YM3812interface ym3812_interface =
  798. {
  799.     1,            /* 1 chip */
  800.     4000000,    /* 4 MHz - accurate for POW, should be accurate for others */
  801.     { 50 },
  802.     { irqhandler },
  803. };
  804.  
  805. static struct UPD7759_interface upd7759_interface =
  806. {
  807.     1,        /* number of chips */
  808.     UPD7759_STANDARD_CLOCK,
  809.     { 50 }, /* volume */
  810.     { REGION_SOUND1 },        /* memory region */
  811.     UPD7759_STANDALONE_MODE,        /* chip mode */
  812.     {0}
  813. };
  814.  
  815. /******************************************************************************/
  816.  
  817. static struct MachineDriver machine_driver_ikari3 =
  818. {
  819.     /* basic machine hardware */
  820.     {
  821.          {
  822.             CPU_M68000,
  823.             10000000,    /* Accurate */
  824.             searchar_readmem,searchar_writemem,0,0,
  825.             m68_level1_irq,1
  826.         },
  827.         {
  828.             CPU_Z80 | CPU_AUDIO_CPU,
  829.             4000000,    /* Accurate */
  830.             sound_readmem,sound_writemem,
  831.             sound_readport,sound_writeport,
  832.             ignore_interrupt,0
  833.         }
  834.     },
  835.     60, DEFAULT_60HZ_VBLANK_DURATION,
  836.     1,
  837.     0,
  838.  
  839.     /* video hardware */
  840.      32*8, 32*8, { 0*8, 32*8-1, 2*8, 30*8-1 },
  841.  
  842.     ikari3_gfxdecodeinfo,
  843.     2048, 2048,
  844.     0,
  845.  
  846.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  847.     0,
  848.     ikari3_vh_start,
  849.     0,
  850.     searchar_vh_screenrefresh,
  851.  
  852.     /* sound hardware */
  853.     0,0,0,0,
  854.     {
  855.         {
  856.             SOUND_YM3812,
  857.             &ym3812_interface
  858.         },
  859.         {
  860.             SOUND_UPD7759,
  861.             &upd7759_interface
  862.         }
  863.     }
  864. };
  865.  
  866. static struct MachineDriver machine_driver_pow =
  867. {
  868.     /* basic machine hardware */
  869.     {
  870.          {
  871.             CPU_M68000,
  872.             10000000,    /* Accurate */
  873.             pow_readmem,pow_writemem,0,0,
  874.             m68_level1_irq,1
  875.         },
  876.         {
  877.             CPU_Z80 | CPU_AUDIO_CPU,
  878.             4000000,    /* Accurate */
  879.             sound_readmem,sound_writemem,
  880.             sound_readport,sound_writeport,
  881.             ignore_interrupt,0
  882.         }
  883.     },
  884.     60, DEFAULT_60HZ_VBLANK_DURATION,
  885.     1,
  886.     0,
  887.  
  888.     /* video hardware */
  889.      32*8, 32*8, { 0*8, 32*8-1, 2*8, 30*8-1 },
  890.  
  891.     pow_gfxdecodeinfo,
  892.     2048, 2048,
  893.     0,
  894.  
  895.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  896.     0,
  897.     pow_vh_start,
  898.     0,
  899.     pow_vh_screenrefresh,
  900.  
  901.     /* sound hardware */
  902.     0,0,0,0,
  903.     {
  904.         {
  905.             SOUND_YM3812,
  906.             &ym3812_interface
  907.         },
  908.         {
  909.             SOUND_UPD7759,
  910.             &upd7759_interface
  911.         }
  912.     }
  913. };
  914.  
  915. static struct MachineDriver machine_driver_searchar =
  916. {
  917.     /* basic machine hardware */
  918.     {
  919.          {
  920.             CPU_M68000,
  921.             12000000,
  922.             searchar_readmem,searchar_writemem,0,0,
  923.             m68_level1_irq,1
  924.         },
  925.         {
  926.             CPU_Z80 | CPU_AUDIO_CPU,
  927.             4000000,
  928.             sound_readmem,sound_writemem,
  929.             sound_readport,sound_writeport,
  930.             ignore_interrupt,0
  931.         }
  932.     },
  933.     60, DEFAULT_60HZ_VBLANK_DURATION,
  934.     1,
  935.     0,
  936.  
  937.     /* video hardware */
  938.     32*8, 32*8, { 0*8, 32*8-1, 2*8, 30*8-1 },
  939.  
  940.     searchar_gfxdecodeinfo,
  941.     2048, 2048,
  942.     0,
  943.  
  944.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  945.     0,
  946.     searchar_vh_start,
  947.     0,
  948.     searchar_vh_screenrefresh,
  949.  
  950.     /* sound hardware */
  951.     0,0,0,0,
  952.     {
  953.         {
  954.             SOUND_YM3812,
  955.             &ym3812_interface
  956.         },
  957.         {
  958.             SOUND_UPD7759,
  959.             &upd7759_interface
  960.         }
  961.     }
  962. };
  963.  
  964. static struct MachineDriver machine_driver_streetsm =
  965. {
  966.     /* basic machine hardware */
  967.     {
  968.          {
  969.             CPU_M68000,
  970.             10000000,    /* Accurate */
  971.             pow_readmem,pow_writemem,0,0,
  972.             m68_level1_irq,1
  973.         },
  974.         {
  975.             CPU_Z80 | CPU_AUDIO_CPU,
  976.             4000000,    /* Accurate */
  977.             sound_readmem,sound_writemem,
  978.             sound_readport,sound_writeport,
  979.             ignore_interrupt,0
  980.         }
  981.     },
  982.     60, DEFAULT_60HZ_VBLANK_DURATION,
  983.     1,
  984.     0,
  985.  
  986.     /* video hardware */
  987.      32*8, 32*8, { 0*8, 32*8-1, 2*8, 30*8-1 },
  988.  
  989.     searchar_gfxdecodeinfo,
  990.     2048, 2048,
  991.     0,
  992.  
  993.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  994.     0,
  995.     pow_vh_start,
  996.     0,
  997.     searchar_vh_screenrefresh,
  998.  
  999.     /* sound hardware */
  1000.     0,0,0,0,
  1001.     {
  1002.         {
  1003.             SOUND_YM3812,
  1004.             &ym3812_interface
  1005.         },
  1006.         {
  1007.             SOUND_UPD7759,
  1008.             &upd7759_interface
  1009.         }
  1010.     }
  1011. };
  1012.  
  1013. /******************************************************************************/
  1014.  
  1015. ROM_START( pow )
  1016.     ROM_REGION( 0x40000, REGION_CPU1 )
  1017.     ROM_LOAD_EVEN( "dg1",   0x000000, 0x20000, 0x8e71a8af )
  1018.     ROM_LOAD_ODD ( "dg2",   0x000000, 0x20000, 0x4287affc )
  1019.  
  1020.     ROM_REGION( 0x10000, REGION_CPU2 )    /* Sound CPU */
  1021.     ROM_LOAD( "dg8",        0x000000, 0x10000, 0xd1d61da3 )
  1022.  
  1023.     ROM_REGION( 0x010000, REGION_GFX1 | REGIONFLAG_DISPOSE )    /* characters */
  1024.     ROM_LOAD( "dg9",        0x000000, 0x08000, 0xdf864a08 )
  1025.     ROM_LOAD( "dg10",       0x008000, 0x08000, 0x9e470d53 )
  1026.  
  1027.     ROM_REGION( 0x200000, REGION_GFX2 | REGIONFLAG_DISPOSE )    /* sprites */
  1028.     ROM_LOAD( "snk880.11a", 0x000000, 0x20000, 0xe70fd906 )
  1029.     ROM_LOAD( "snk880.12a", 0x020000, 0x20000, 0x628b1aed )
  1030.     ROM_LOAD( "snk880.13a", 0x040000, 0x20000, 0x19dc8868 )
  1031.     ROM_LOAD( "snk880.14a", 0x060000, 0x20000, 0x47cd498b )
  1032.     ROM_LOAD( "snk880.15a", 0x080000, 0x20000, 0x7a90e957 )
  1033.     ROM_LOAD( "snk880.16a", 0x0a0000, 0x20000, 0xe40a6c13 )
  1034.     ROM_LOAD( "snk880.17a", 0x0c0000, 0x20000, 0xc7931cc2 )
  1035.     ROM_LOAD( "snk880.18a", 0x0e0000, 0x20000, 0xeed72232 )
  1036.     ROM_LOAD( "snk880.19a", 0x100000, 0x20000, 0x1775b8dd )
  1037.     ROM_LOAD( "snk880.20a", 0x120000, 0x20000, 0xf8e752ec )
  1038.     ROM_LOAD( "snk880.21a", 0x140000, 0x20000, 0x27e9fffe )
  1039.     ROM_LOAD( "snk880.22a", 0x160000, 0x20000, 0xaa9c00d8 )
  1040.     ROM_LOAD( "snk880.23a", 0x180000, 0x20000, 0xadb6ad68 )
  1041.     ROM_LOAD( "snk880.24a", 0x1a0000, 0x20000, 0xdd41865a )
  1042.     ROM_LOAD( "snk880.25a", 0x1c0000, 0x20000, 0x055759ad )
  1043.     ROM_LOAD( "snk880.26a", 0x1e0000, 0x20000, 0x9bc261c5 )
  1044.  
  1045.     ROM_REGION( 0x10000, REGION_SOUND1 )    /* UPD7759 samples */
  1046.     ROM_LOAD( "dg7",        0x000000, 0x10000, 0xaba9a9d3 )
  1047. ROM_END
  1048.  
  1049. ROM_START( powj )
  1050.     ROM_REGION( 0x40000, REGION_CPU1 )
  1051.     ROM_LOAD_EVEN( "1-2",   0x000000, 0x20000, 0x2f17bfb0 )
  1052.     ROM_LOAD_ODD ( "2-2",   0x000000, 0x20000, 0xbaa32354 )
  1053.  
  1054.     ROM_REGION( 0x10000, REGION_CPU2 )    /* Sound CPU */
  1055.     ROM_LOAD( "dg8",        0x000000, 0x10000, 0xd1d61da3 )
  1056.  
  1057.     ROM_REGION( 0x010000, REGION_GFX1 | REGIONFLAG_DISPOSE )    /* characters */
  1058.     ROM_LOAD( "dg9",        0x000000, 0x08000, 0xdf864a08 )
  1059.     ROM_LOAD( "dg10",       0x008000, 0x08000, 0x9e470d53 )
  1060.  
  1061.     ROM_REGION( 0x200000, REGION_GFX2 | REGIONFLAG_DISPOSE )    /* sprites */
  1062.     ROM_LOAD( "snk880.11a", 0x000000, 0x20000, 0xe70fd906 )
  1063.     ROM_LOAD( "snk880.12a", 0x020000, 0x20000, 0x628b1aed )
  1064.     ROM_LOAD( "snk880.13a", 0x040000, 0x20000, 0x19dc8868 )
  1065.     ROM_LOAD( "snk880.14a", 0x060000, 0x20000, 0x47cd498b )
  1066.     ROM_LOAD( "snk880.15a", 0x080000, 0x20000, 0x7a90e957 )
  1067.     ROM_LOAD( "snk880.16a", 0x0a0000, 0x20000, 0xe40a6c13 )
  1068.     ROM_LOAD( "snk880.17a", 0x0c0000, 0x20000, 0xc7931cc2 )
  1069.     ROM_LOAD( "snk880.18a", 0x0e0000, 0x20000, 0xeed72232 )
  1070.     ROM_LOAD( "snk880.19a", 0x100000, 0x20000, 0x1775b8dd )
  1071.     ROM_LOAD( "snk880.20a", 0x120000, 0x20000, 0xf8e752ec )
  1072.     ROM_LOAD( "snk880.21a", 0x140000, 0x20000, 0x27e9fffe )
  1073.     ROM_LOAD( "snk880.22a", 0x160000, 0x20000, 0xaa9c00d8 )
  1074.     ROM_LOAD( "snk880.23a", 0x180000, 0x20000, 0xadb6ad68 )
  1075.     ROM_LOAD( "snk880.24a", 0x1a0000, 0x20000, 0xdd41865a )
  1076.     ROM_LOAD( "snk880.25a", 0x1c0000, 0x20000, 0x055759ad )
  1077.     ROM_LOAD( "snk880.26a", 0x1e0000, 0x20000, 0x9bc261c5 )
  1078.  
  1079.     ROM_REGION( 0x10000, REGION_SOUND1 )    /* UPD7759 samples */
  1080.     ROM_LOAD( "dg7",        0x000000, 0x10000, 0xaba9a9d3 )
  1081. ROM_END
  1082.  
  1083. ROM_START( searchar )
  1084.     ROM_REGION( 0x40000, REGION_CPU1 )
  1085.     ROM_LOAD_EVEN( "bhw.2", 0x000000, 0x20000, 0xe1430138 )
  1086.     ROM_LOAD_ODD ( "bhw.3", 0x000000, 0x20000, 0xee1f9374 )
  1087.  
  1088.     ROM_REGION( 0x10000, REGION_CPU2 )    /* Sound CPU */
  1089.     ROM_LOAD( "bh.5",       0x000000, 0x10000, 0x53e2fa76 )
  1090.  
  1091.     ROM_REGION( 0x010000, REGION_GFX1 | REGIONFLAG_DISPOSE )    /* characters */
  1092.     ROM_LOAD( "bh.7",       0x000000, 0x08000, 0xb0f1b049 )
  1093.     ROM_LOAD( "bh.8",       0x008000, 0x08000, 0x174ddba7 )
  1094.  
  1095.     ROM_REGION( 0x300000, REGION_GFX2 | REGIONFLAG_DISPOSE )    /* sprites */
  1096.     ROM_LOAD( "bh.c1",      0x000000, 0x80000, 0x1fb8f0ae )
  1097.     ROM_LOAD( "bh.c3",      0x080000, 0x80000, 0xfd8bc407 )
  1098.     ROM_LOAD( "bh.c5",      0x100000, 0x80000, 0x1d30acc3 )
  1099.     ROM_LOAD( "bh.c2",      0x180000, 0x80000, 0x7c803767 )
  1100.     ROM_LOAD( "bh.c4",      0x200000, 0x80000, 0xeede7c43 )
  1101.     ROM_LOAD( "bh.c6",      0x280000, 0x80000, 0x9f785cd9 )
  1102.  
  1103.     ROM_REGION( 0x20000, REGION_SOUND1 )    /* UPD7759 samples */
  1104.     ROM_LOAD( "bh.v1",      0x000000, 0x20000, 0x07a6114b )
  1105.  
  1106.     ROM_REGION( 0x40000, REGION_USER1 ) /* Extra code bank */
  1107.     ROM_LOAD_EVEN( "bhw.1", 0x000000, 0x20000, 0x62b60066 )
  1108.     ROM_LOAD_ODD ( "bhw.4", 0x000000, 0x20000, 0x16d8525c )
  1109. ROM_END
  1110.  
  1111. ROM_START( sercharu )
  1112.     ROM_REGION( 0x40000, REGION_CPU1 )
  1113.     ROM_LOAD_EVEN( "bh.2",  0x000000, 0x20000, 0xc852e2e2 )
  1114.     ROM_LOAD_ODD ( "bh.3",  0x000000, 0x20000, 0xbc04a4a1 )
  1115.  
  1116.     ROM_REGION( 0x10000, REGION_CPU2 )    /* Sound CPU */
  1117.     ROM_LOAD( "bh.5",       0x000000, 0x10000, 0x53e2fa76 )
  1118.  
  1119.     ROM_REGION( 0x010000, REGION_GFX1 | REGIONFLAG_DISPOSE )    /* characters */
  1120.     ROM_LOAD( "bh.7",       0x000000, 0x08000, 0xb0f1b049 )
  1121.     ROM_LOAD( "bh.8",       0x008000, 0x08000, 0x174ddba7 )
  1122.  
  1123.     ROM_REGION( 0x300000, REGION_GFX2 | REGIONFLAG_DISPOSE )    /* sprites */
  1124.     ROM_LOAD( "bh.c1",      0x000000, 0x80000, 0x1fb8f0ae )
  1125.     ROM_LOAD( "bh.c3",      0x080000, 0x80000, 0xfd8bc407 )
  1126.     ROM_LOAD( "bh.c5",      0x100000, 0x80000, 0x1d30acc3 )
  1127.     ROM_LOAD( "bh.c2",      0x180000, 0x80000, 0x7c803767 )
  1128.     ROM_LOAD( "bh.c4",      0x200000, 0x80000, 0xeede7c43 )
  1129.     ROM_LOAD( "bh.c6",      0x280000, 0x80000, 0x9f785cd9 )
  1130.  
  1131.     ROM_REGION( 0x20000, REGION_SOUND1 )    /* UPD7759 samples */
  1132.     ROM_LOAD( "bh.v1",      0x000000, 0x20000, 0x07a6114b )
  1133.  
  1134.     ROM_REGION( 0x40000, REGION_USER1 ) /* Extra code bank */
  1135.     ROM_LOAD_EVEN( "bh.1",  0x000000, 0x20000, 0xba9ca70b )
  1136.     ROM_LOAD_ODD ( "bh.4",  0x000000, 0x20000, 0xeabc5ddf )
  1137. ROM_END
  1138.  
  1139. ROM_START( streetsm )
  1140.     ROM_REGION( 0x40000, REGION_CPU1 )
  1141.     ROM_LOAD_EVEN( "s2-1ver2.14h", 0x00000, 0x20000, 0x655f4773 )
  1142.     ROM_LOAD_ODD ( "s2-2ver2.14k", 0x00000, 0x20000, 0xefae4823 )
  1143.  
  1144.     ROM_REGION( 0x10000, REGION_CPU2 )    /* Sound CPU */
  1145.     ROM_LOAD( "s2-5.16c",    0x000000, 0x10000, 0xca4b171e )
  1146.  
  1147.     ROM_REGION( 0x010000, REGION_GFX1 | REGIONFLAG_DISPOSE )    /* characters */
  1148.     ROM_LOAD( "s2-9.25l",    0x000000, 0x08000, 0x09b6ac67 )
  1149.     ROM_LOAD( "s2-10.25m",   0x008000, 0x08000, 0x89e4ee6f )
  1150.  
  1151.     ROM_REGION( 0x300000, REGION_GFX2 | REGIONFLAG_DISPOSE )    /* sprites */
  1152.     ROM_LOAD( "stsmart.900", 0x000000, 0x80000, 0xa8279a7e )
  1153.     ROM_LOAD( "stsmart.902", 0x080000, 0x80000, 0x2f021aa1 )
  1154.     ROM_LOAD( "stsmart.904", 0x100000, 0x80000, 0x167346f7 )
  1155.     ROM_LOAD( "stsmart.901", 0x180000, 0x80000, 0xc305af12 )
  1156.     ROM_LOAD( "stsmart.903", 0x200000, 0x80000, 0x73c16d35 )
  1157.     ROM_LOAD( "stsmart.905", 0x280000, 0x80000, 0xa5beb4e2 )
  1158.  
  1159.     ROM_REGION( 0x20000, REGION_SOUND1 )    /* UPD7759 samples */
  1160.     ROM_LOAD( "s2-6.18d",    0x000000, 0x20000, 0x47db1605 )
  1161. ROM_END
  1162.  
  1163. ROM_START( streets1 )
  1164.     ROM_REGION( 0x40000, REGION_CPU1 )
  1165.     ROM_LOAD_EVEN( "s2-1ver1.9c",  0x00000, 0x20000, 0xb59354c5 )
  1166.     ROM_LOAD_ODD ( "s2-2ver1.10c", 0x00000, 0x20000, 0xe448b68b )
  1167.  
  1168.     ROM_REGION( 0x10000, REGION_CPU2 )    /* Sound CPU */
  1169.     ROM_LOAD( "s2-5.16c",    0x000000, 0x10000, 0xca4b171e )
  1170.  
  1171.     ROM_REGION( 0x010000, REGION_GFX1 | REGIONFLAG_DISPOSE )    /* characters */
  1172.     ROM_LOAD( "s2-7.15l",    0x000000, 0x08000, 0x22bedfe5 )
  1173.     ROM_LOAD( "s2-8.15m",    0x008000, 0x08000, 0x6a1c70ab )
  1174.  
  1175.     ROM_REGION( 0x300000, REGION_GFX2 | REGIONFLAG_DISPOSE )    /* sprites */
  1176.     ROM_LOAD( "stsmart.900", 0x000000, 0x80000, 0xa8279a7e )
  1177.     ROM_LOAD( "stsmart.902", 0x080000, 0x80000, 0x2f021aa1 )
  1178.     ROM_LOAD( "stsmart.904", 0x100000, 0x80000, 0x167346f7 )
  1179.     ROM_LOAD( "stsmart.901", 0x180000, 0x80000, 0xc305af12 )
  1180.     ROM_LOAD( "stsmart.903", 0x200000, 0x80000, 0x73c16d35 )
  1181.     ROM_LOAD( "stsmart.905", 0x280000, 0x80000, 0xa5beb4e2 )
  1182.  
  1183.     ROM_REGION( 0x20000, REGION_SOUND1 )    /* UPD7759 samples */
  1184.     ROM_LOAD( "s2-6.18d",    0x000000, 0x20000, 0x47db1605 )
  1185. ROM_END
  1186.  
  1187. ROM_START( streetsj )
  1188.     ROM_REGION( 0x40000, REGION_CPU1 )
  1189.     ROM_LOAD_EVEN( "s2v1j_01.bin", 0x00000, 0x20000, 0xf031413c )
  1190.     ROM_LOAD_ODD ( "s2v1j_02.bin", 0x00000, 0x20000, 0xe403a40b )
  1191.  
  1192.     ROM_REGION( 0x10000, REGION_CPU2 )    /* Sound CPU */
  1193.     ROM_LOAD( "s2-5.16c",    0x000000, 0x10000, 0xca4b171e )
  1194.  
  1195.     ROM_REGION( 0x010000, REGION_GFX1 | REGIONFLAG_DISPOSE )    /* characters */
  1196.     ROM_LOAD( "s2-7.15l",    0x000000, 0x08000, 0x22bedfe5 )
  1197.     ROM_LOAD( "s2-8.15m",    0x008000, 0x08000, 0x6a1c70ab )
  1198.  
  1199.     ROM_REGION( 0x300000, REGION_GFX2 | REGIONFLAG_DISPOSE )    /* sprites */
  1200.     ROM_LOAD( "stsmart.900", 0x000000, 0x80000, 0xa8279a7e )
  1201.     ROM_LOAD( "stsmart.902", 0x080000, 0x80000, 0x2f021aa1 )
  1202.     ROM_LOAD( "stsmart.904", 0x100000, 0x80000, 0x167346f7 )
  1203.     ROM_LOAD( "stsmart.901", 0x180000, 0x80000, 0xc305af12 )
  1204.     ROM_LOAD( "stsmart.903", 0x200000, 0x80000, 0x73c16d35 )
  1205.     ROM_LOAD( "stsmart.905", 0x280000, 0x80000, 0xa5beb4e2 )
  1206.  
  1207.     ROM_REGION( 0x20000, REGION_SOUND1 )    /* UPD7759 samples */
  1208.     ROM_LOAD( "s2-6.18d",    0x000000, 0x20000, 0x47db1605 )
  1209. ROM_END
  1210.  
  1211. ROM_START( ikari3 )
  1212.     ROM_REGION( 0x40000, REGION_CPU1 )
  1213.     ROM_LOAD_EVEN( "ik3-2.bin", 0x000000, 0x20000, 0xa7b34dcd )
  1214.     ROM_LOAD_ODD ( "ik3-3.bin", 0x000000, 0x20000, 0x50f2b83d )
  1215.  
  1216.     ROM_REGION( 0x10000, REGION_CPU2 )    /* Sound CPU */
  1217.     ROM_LOAD( "ik3-5.bin",  0x000000, 0x10000, 0xce6706fc )
  1218.  
  1219.     ROM_REGION( 0x010000, REGION_GFX1 | REGIONFLAG_DISPOSE )    /* characters */
  1220.     ROM_LOAD( "ik3-7.bin",  0x000000, 0x08000, 0x0b4804df )
  1221.     ROM_LOAD( "ik3-8.bin",  0x008000, 0x08000, 0x10ab4e50 )
  1222.  
  1223.     ROM_REGION( 0x280000, REGION_GFX2 | REGIONFLAG_DISPOSE )    /* sprites */
  1224.     ROM_LOAD( "ik3-13.bin", 0x000000, 0x20000, 0x9a56bd32 )
  1225.     ROM_LOAD( "ik3-12.bin", 0x020000, 0x20000, 0x0ce6a10a )
  1226.     ROM_LOAD( "ik3-11.bin", 0x040000, 0x20000, 0xe4e2be43 )
  1227.     ROM_LOAD( "ik3-10.bin", 0x060000, 0x20000, 0xac222372 )
  1228.     ROM_LOAD( "ik3-9.bin",  0x080000, 0x20000, 0xc33971c2 )
  1229.     ROM_LOAD( "ik3-14.bin", 0x0a0000, 0x20000, 0x453bea77 )
  1230.     ROM_LOAD( "ik3-15.bin", 0x0c0000, 0x20000, 0x781a81fc )
  1231.     ROM_LOAD( "ik3-16.bin", 0x0e0000, 0x20000, 0x80ba400b )
  1232.     ROM_LOAD( "ik3-17.bin", 0x100000, 0x20000, 0x0cc3ce4a )
  1233.     ROM_LOAD( "ik3-18.bin", 0x120000, 0x20000, 0xba106245 )
  1234.     ROM_LOAD( "ik3-23.bin", 0x140000, 0x20000, 0xd0fd5c77 )
  1235.     ROM_LOAD( "ik3-22.bin", 0x160000, 0x20000, 0x4878d883 )
  1236.     ROM_LOAD( "ik3-21.bin", 0x180000, 0x20000, 0x50d0fbf0 )
  1237.     ROM_LOAD( "ik3-20.bin", 0x1a0000, 0x20000, 0x9a851efc )
  1238.     ROM_LOAD( "ik3-19.bin", 0x1c0000, 0x20000, 0x4ebdba89 )
  1239.     ROM_LOAD( "ik3-24.bin", 0x1e0000, 0x20000, 0xe9b26d68 )
  1240.     ROM_LOAD( "ik3-25.bin", 0x200000, 0x20000, 0x073b03f1 )
  1241.     ROM_LOAD( "ik3-26.bin", 0x220000, 0x20000, 0x9c613561 )
  1242.     ROM_LOAD( "ik3-27.bin", 0x240000, 0x20000, 0x16dd227e )
  1243.     ROM_LOAD( "ik3-28.bin", 0x260000, 0x20000, 0x711715ae )
  1244.  
  1245.     ROM_REGION( 0x20000, REGION_SOUND1 )    /* UPD7759 samples */
  1246.     ROM_LOAD( "ik3-6.bin",  0x000000, 0x20000, 0x59d256a4 )
  1247.  
  1248.     ROM_REGION( 0x40000, REGION_USER1 ) /* Extra code bank */
  1249.     ROM_LOAD_EVEN( "ik3-1.bin",  0x000000, 0x10000, 0x47e4d256 )
  1250.     ROM_LOAD_ODD ( "ik3-4.bin",  0x000000, 0x10000, 0xa43af6b5 )
  1251. ROM_END
  1252.  
  1253. /******************************************************************************/
  1254.  
  1255. static void init_searchar(void)
  1256. {
  1257.     cpu_setbank(8, memory_region(REGION_USER1));
  1258. }
  1259.  
  1260. /******************************************************************************/
  1261.  
  1262. GAME( 1988, pow,      0,        pow,      pow,      0,        ROT0,  "SNK", "P.O.W. - Prisoners of War (US)" )
  1263. GAME( 1988, powj,     pow,      pow,      powj,     0,        ROT0,  "SNK", "Datsugoku - Prisoners of War (Japan)" )
  1264. GAME( 1989, searchar, 0,        searchar, searchar, searchar, ROT90, "SNK", "SAR - Search And Rescue (World)" )
  1265. GAME( 1989, sercharu, searchar, searchar, searchar, searchar, ROT90, "SNK", "SAR - Search And Rescue (US)" )
  1266. GAME( 1989, streetsm, 0,        streetsm, streetsm, 0,        ROT0,  "SNK", "Street Smart (US version 2)" )
  1267. GAME( 1989, streets1, streetsm, searchar, streetsm, 0,        ROT0,  "SNK", "Street Smart (US version 1)" )
  1268. GAME( 1989, streetsj, streetsm, searchar, streetsj, 0,        ROT0,  "SNK", "Street Smart (Japan version 1)" )
  1269. GAME( 1989, ikari3,   0,        ikari3,   ikari3,   searchar, ROT0,  "SNK", "Ikari III - The Rescue" )
  1270.